$OpenBSD: patch-mkspecs_openbsd-clang_qmake_conf,v 1.2 2017/05/12 16:05:06 espie Exp $

Index: mkspecs/openbsd-clang/qmake.conf
--- mkspecs/openbsd-clang/qmake.conf.orig
+++ mkspecs/openbsd-clang/qmake.conf
@@ -0,0 +1,54 @@
+#
+# qmake configuration for openbsd-g++
+#
+
+MAKEFILE_GENERATOR      = UNIX
+QMAKE_PLATFORM          = openbsd
+
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+include(../common/bsd/bsd.conf)
+
+# Addon software goes into /usr/local on OpenBSD, by default we will look there
+LOCALBASE               = $$(LOCALBASE)
+isEmpty(LOCALBASE) {
+  LOCALBASE             = /usr/local
+}
+QMAKE_INCDIR_PREPEND    = /usr/include/c++/v1
+QMAKE_INCDIR            = $$LOCALBASE/include
+QMAKE_LIBDIR            = $$LOCALBASE/lib
+
+# System provided X11 defaults to X11R6 path on OpenBSD
+X11BASE                 = $$(X11BASE)
+isEmpty(X11BASE) {
+  X11BASE               = /usr/X11R6
+}
+QMAKE_INCDIR_X11        = $$X11BASE/include
+QMAKE_LIBDIR_X11        = $$X11BASE/lib
+QMAKE_INCDIR_OPENGL     = $$X11BASE/include
+QMAKE_LIBDIR_OPENGL     = $$X11BASE/lib
+
+QMAKE_RPATHDIR         += $$QMAKE_LIBDIR_X11
+
+# System compiler is gcc 4.2.1 up to OpenBSD 6.0.
+# For proper C++11 support, we need to use a newer gcc from ports/packages,
+# where compiler commands are renamed to egcc/eg++. Therefore, redefine
+# mkspecs/common/g++-base.conf compiler commands
+QMAKE_CC                = cc
+
+QMAKE_LINK_C            = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB      = $$QMAKE_CC
+
+QMAKE_CXX               = c++
+
+QMAKE_LINK              = $$QMAKE_CXX
+QMAKE_LINK_SHLIB        = $$QMAKE_CXX
+
+QMAKE_OPENBSD_SHLIB	= 1
+
+# Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ
+QMAKE_LFLAGS_NOUNDEF    =
+QMAKE_LFLAGS_SONAME	=
+QMAKE_LFLAGS_NEW_DTAGS  =
+
+load(qt_config)
